function init(){
    
	 document.getElementById("province").addEventListener("change",()=>{
		
		 	var obj = document.getElementById("province"); // 定位id
			var index = obj.selectedIndex;
			var text = obj.options[index].text; 
			var value = obj.options[index].value; 
			var html=null;
			let param="login.servlet?param=getcity&";
			param+="province="+value;
			 let au=new AjaxUtils;
	        au.ajaxRequest(param,(xhr)=>{
	        		document.getElementById("city").innerHTML=xhr.responseText;
	        	});
	       },false);
	document.getElementById("userID").addEventListener("blur",()=>{
			var userId=document.getElementById("userID").value;
			let param="register.servlet?param=testuserid&";
			param+="userID="+userId;
			 let au=new AjaxUtils;
			au.ajaxRequest(param,(xhr)=>{
				var Json=JSON.parse(xhr.responseText);
				if(Json.data=="notnull"){document.getElementById("userIDMessage").innerHTML="ID不能为空"}
				if(Json.data=="pass"){document.getElementById("userIDMessage").innerHTML="ID可用"}
				if(Json.data=="have"){document.getElementById("userIDMessage").innerHTML="ID未修改"}
			},false);
			
	},false);
	document.getElementById("userName").addEventListener("blur",()=>{
		
		var userName=document.getElementById("userName").value;
		let param="register.servlet?param=testusername&";
		param+="userName="+userName;
		 let au=new AjaxUtils;
		au.ajaxRequest(param,(xhr)=>{
			
			var Json=JSON.parse(xhr.responseText);
			if(Json.data=="notnull"){document.getElementById("userNameMessage").innerHTML="用户名不能为空"}
			if(Json.data=="pass"){document.getElementById("userNameMessage").innerHTML="用户名可用"}
			if(Json.data=="have"){document.getElementById("userNameMessage").innerHTML="用户名未修改"}
			
		},false);
		
},false);
	 
}
	
window.addEventListener("load",init,false);
